﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for ThanhVienEntity
/// </summary>
public class ThanhVienEntity
{

    private int maTV;
    private string tenTV;
    private string tenDangNhap;
    private string matKhau;
    private string email;
    private string diaChi;
    private string dienThoai;
    private string gioiTinh;
    private string quyen;
    public ThanhVienEntity()
    { }
    public ThanhVienEntity(int maTV, string tenTV, string tenDangNhap, string matKhau, string email, string diaChi, string dienThoai, string gioiTinh, string quyen)
    {
        this.maTV = maTV;
        this.tenTV = tenTV;
        this.tenDangNhap = tenDangNhap;
        this.matKhau = matKhau;
        this.email = email;
        this.diaChi = diaChi;
        this.dienThoai = dienThoai;
        this.gioiTinh = gioiTinh;
        this.quyen = quyen;
    }
    public int MaTV
    {
        get { return this.maTV; }
        set
        {
            if (value == null)
                throw new Exception("maTV not allow nullvalue.");
            this.maTV = value;
        }
    }
    public string TenTV
    {
        get { return this.tenTV; }
        set { this.tenTV = value; }
    }
    public string TenDangNhap
    {
        get { return this.tenDangNhap; }
        set { this.tenDangNhap = value; }
    }
    public string MatKhau
    {
        get { return this.matKhau; }
        set { this.matKhau = value; }
    }
    public string Email
    {
        get { return this.email; }
        set { this.email = value; }
    }
    public string DiaChi
    {
        get { return this.diaChi; }
        set { this.diaChi = value; }
    }
    public string DienThoai
    {
        get { return this.dienThoai; }
        set { this.dienThoai = value; }
    }
    public string GioiTinh
    {
        get { return this.gioiTinh; }
        set { this.gioiTinh = value; }
    }
    public string Quyen
    {
        get { return this.quyen; }
        set
        {
            if (value == null)
                throw new Exception("quyen not allow nullvalue.");
            this.quyen = value;
        }
    }
    public override string ToString()
    {
        return this.maTV + "; " + this.tenTV + "; " + this.tenDangNhap + "; " + this.matKhau + "; " + this.email + "; " + this.diaChi + "; " + this.dienThoai + "; " + this.gioiTinh + "; " + this.quyen + "; ";
    }
    public override bool Equals(Object obj)
    {
        ThanhVienEntity me = (ThanhVienEntity)obj;
        bool ret = this.MaTV.Equals(me.MaTV);
        return ret;
    }
    public override int GetHashCode()
    {
        return this.MaTV.GetHashCode();
    }

}